<!--
 * @Author: 陈焕杰
 * @Date: 2020-06-29 16:07:18
 * @LastEditTime: 2020-07-03 14:10:06
 * @LastEditors: Please set LastEditors
 * @Description: 商品详情
 * @FilePath: \mobile_project\src\pages\user\orders\orderDetail\components\shopDetail.vue
--> 

<template>
  <div class="shop-detail">
    <van-cell-group>
      <van-cell title="商品详情" icon="bookmark-o" />
      <van-cell class="shop-content">
        <div class="detail" v-for="item of order.goods" :key="item.id">
          <van-image :src="item.goods_thumb" lazy-load>
            <template v-slot:loading>
              <van-loading type="spinner" size="20" />
            </template>
          </van-image>
          <div class="center">
            <p class="name">{{item.goods_name}}</p>
            <p class="num">{{item.attr_info}}</p>
            <p class="amount">×{{item.goods_number}}</p>
          </div>
          <p class="price">{{item.goods_price | rmb}}</p>
        </div>
      </van-cell>
      <van-cell>
        <template>
          <div class="contact">
            我的留言:
            <span>{{order.user_remark}}</span>
          </div>
        </template>
      </van-cell>
    </van-cell-group>
  </div>
</template>

<script>
export default {
  props: {
    order: {
      type: Object,
      required: true
    }
  }
};
</script>

<style lang="scss" scoped>
.shop-detail {
  .van-cell {
    .van-icon {
      font-size: 18px;
      color: #999;
    }
    .van-cell__title {
      span {
        font-size: 14px;
      }
    }
    .van-cell__value {
      .contact {
        font-size: 14px;
        span {
          font-size: 14px;
          color: #999;
        }
      }
    }
  }
  .shop-content {
    padding-bottom: 0;
    .detail {
      padding-bottom: 12px;
      display: flex;
      align-items: center;
      position: relative;
      .van-image {
        width: 80px;
        height: 80px;
      }
      .center {
        margin: 0 10px;
        width: 360px;
        .name {
          font-size: 13px;
          color: #000;
        }
        .num {
          margin: 5px 0;
          color: #cfcfcf;
          font-size: 13px;
        }
        .amount {
          font-size: 13px;
          color: #000;
        }
      }
      .price {
        font-size: 13px;
        color: #cfcfcf;
      }
    }
  }
}
</style>